﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;

namespace xTeam.HengLe.Controller.Manage
{
    [ManageAuthorize]
    public partial class BaseController : Controller.BaseController
    {
    }

    public class ManageAuthorize : AuthorizeAttribute
    {
        protected override bool AuthorizeCore(System.Web.HttpContextBase httpContext)
        {
            if (httpContext.Session["Manage"] != null)
            {
                return true;
            }
            else
            {
                httpContext.Response.Redirect(string.Format("~/ManageLogin.aspx?returnUrl={0}", httpContext.Request.RawUrl));
            }
            return base.AuthorizeCore(httpContext);
        }
    }
}
